--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  R:\Current Research\Markets-Pridemore\Work\MAR08-CondtionModel.log
  log type:  text
 opened on:   2 Jun 2025, 15:39:02

. 
. //  program:    Stata 
. //  task:       Cross-Sectional Models 
. //  project:    Markets  
. 
. version
version 17.0

. clear all

. macro drop _all

. set linesize 80

. set more off

. local tag " 06-29-24| Cleaned 06-29-24"

. local file "MAR08-CondtionModel"

. local note "|`tag' | `file'"

. local opt "noparen sideway excel noaster  bdec(2)  sdec(2)  pdec(3)   adec(2) 
> e(r2) stats(coef se pval)"

. local dv "lrhom"

. local iv "fraser"

. local iv2 "infantmort" 

. local cont "edu unemp  popdense perurban  sexratio"

. local icid " i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i1
> 9 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 
> i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i5
> 8 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 
> i78 i79 i80 i81 i82 i83 i84 i85  i87 i88"

. local iyear " x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x
> 19 "

. 
. //      #0
. //      loading panel data 
. use MAR06-PanelModels.dta, clear 

. 
. //      #1
. //      LAC nations
. gen LAC=. 
(1,524 missing values generated)

. replace LAC=1 if subregion=="Latin America and the Caribbean"
(400 real changes made)

. replace LAC=1 if region_un_sub==102
(0 real changes made)

. replace LAC=1 if region_un_sub==103
(0 real changes made)

. replace LAC=1 if region_un_sub==104
(0 real changes made)

. 
. tab nation LAC, m 

                      |          LAC
         Country Name |         1          . |     Total
----------------------+----------------------+----------
              Albania |         0          8 |         8 
            Argentina |        20          0 |        20 
              Armenia |         0         14 |        14 
            Australia |         0         19 |        19 
              Austria |         0         20 |        20 
              Bahamas |        16          0 |        16 
              Bahrain |         0          7 |         7 
             Barbados |        13          0 |        13 
              Belgium |         0         19 |        19 
               Belize |        17          0 |        17 
               Brazil |        20          0 |        20 
    Brunei Darussalam |         0          7 |         7 
             Bulgaria |         0         20 |        20 
               Canada |         0         20 |        20 
                Chile |        20          0 |        20 
             Colombia |        20          0 |        20 
           Costa Rica |        20          0 |        20 
              Croatia |         0         19 |        19 
               Cyprus |         0         17 |        17 
              Czechia |         0         20 |        20 
              Denmark |         0         20 |        20 
   Dominican Republic |        19          0 |        19 
              Ecuador |        20          0 |        20 
                Egypt |         0         20 |        20 
          El Salvador |        19          0 |        19 
              Estonia |         0         20 |        20 
                 Fiji |         0         11 |        11 
              Finland |         0         20 |        20 
               France |         0         18 |        18 
              Georgia |         0         16 |        16 
              Germany |         0         20 |        20 
               Greece |         0         20 |        20 
            Guatemala |        20          0 |        20 
               Guyana |        19          0 |        19 
              Hungary |         0         20 |        20 
              Iceland |         0         18 |        18 
              Ireland |         0         17 |        17 
               Israel |         0         20 |        20 
                Italy |         0         20 |        20 
              Jamaica |        13          0 |        13 
                Japan |         0         20 |        20 
               Jordan |         0          9 |         9 
           Kazakhstan |         0         15 |        15 
               Kuwait |         0         20 |        20 
           Kyrgyzstan |         0         15 |        15 
               Latvia |         0         20 |        20 
            Lithuania |         0         20 |        20 
           Luxembourg |         0         20 |        20 
             Malaysia |         0         20 |        20 
                Malta |         0         16 |        16 
            Mauritius |         0         20 |        20 
               Mexico |        20          0 |        20 
           Montenegro |         0          6 |         6 
          Netherlands |         0         20 |        20 
          New Zealand |         0         17 |        17 
            Nicaragua |        15          0 |        15 
      North Macedonia |         0         16 |        16 
               Norway |         0         17 |        17 
                 Oman |         0          6 |         6 
               Panama |        20          0 |        20 
             Paraguay |        20          0 |        20 
                 Peru |        20          0 |        20 
          Philippines |         0         15 |        15 
               Poland |         0         20 |        20 
             Portugal |         0         17 |        17 
                Qatar |         0          9 |         9 
    Republic of Korea |         0         20 |        20 
  Republic of Moldova |         0         14 |        14 
              Romania |         0         20 |        20 
   Russian Federation |         0         20 |        20 
               Serbia |         0         15 |        15 
            Singapore |         0         20 |        20 
             Slovakia |         0         16 |        16 
             Slovenia |         0         20 |        20 
         South Africa |         0         19 |        19 
                Spain |         0         20 |        20 
            Sri Lanka |         0         14 |        14 
               Sweden |         0         19 |        19 
          Switzerland |         0         20 |        20 
 Syrian Arab Republic |         0         11 |        11 
             Thailand |         0         19 |        19 
  Trinidad and Tobago |        13          0 |        13 
               Turkey |         0         11 |        11 
              Ukraine |         0         18 |        18 
United Kingdom of G.. |         0         20 |        20 
United States of Am.. |         0         20 |        20 
              Uruguay |        19          0 |        19 
Venezuela (Bolivari.. |        17          0 |        17 
----------------------+----------------------+----------
                Total |       400      1,124 |     1,524 

. replace LAC=0 if LAC==. 
(1,124 real changes made)

. 
. //      #2
. //      Conditioned sample w/ only and w/o LAC Fraser 
. xtreg `dv' `iv' `iv2' `cont' if LAC==1, fe cluster(CID)

Fixed-effects (within) regression               Number of obs     =        400
Group variable: CID                             Number of groups  =         22

R-squared:                                      Obs per group:
     Within  = 0.0711                                         min =         13
     Between = 0.0060                                         avg =       18.2
     Overall = 0.0087                                         max =         20

                                                F(7,21)           =       1.68
corr(u_i, Xb) = -0.7007                         Prob > F          =     0.1675

                                   (Std. err. adjusted for 22 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
       lrhom | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      fraser |  -.1060327   .1157963    -0.92   0.370    -.3468443     .134779
  infantmort |   .0215866   .0201828     1.07   0.297    -.0203858     .063559
         edu |  -.1854737   2.300291    -0.08   0.936    -4.969192    4.598244
       unemp |  -.0041188   .0223504    -0.18   0.856    -.0505991    .0423615
    popdense |   .0041223    .014504     0.28   0.779    -.0260405    .0342851
    perurban |   .0396438   .0308377     1.29   0.213    -.0244868    .1037744
    sexratio |  -.1426652   .0852977    -1.67   0.109    -.3200515     .034721
       _cons |   13.83225   9.407173     1.47   0.156    -5.731039    33.39554
-------------+----------------------------------------------------------------
     sigma_u |  1.2668539
     sigma_e |  .47279678
         rho |  .87774557   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. outreg2 using `file', `opt' replace addnote(LAC_conditioned) 
MAR08-CondtionModel.xml
dir : seeout

. xttest3

Modified Wald test for groupwise heteroskedasticity
in fixed effect regression model

H0: sigma(i)^2 = sigma^2 for all i

chi2 (22)  =    7754.82
Prob>chi2 =      0.0000


. qui reg `dv' `iv' `iv2' `cont' if LAC==1 

. vif

    Variable |       VIF       1/VIF  
-------------+----------------------
  infantmort |      2.55    0.392810
         edu |      2.42    0.412820
    perurban |      2.20    0.454854
    popdense |      1.85    0.539705
    sexratio |      1.65    0.607488
       unemp |      1.12    0.890548
      fraser |      1.10    0.911865
-------------+----------------------
    Mean VIF |      1.84

. xtserial `dv' `iv' `iv2' `cont' if LAC==1

Wooldridge test for autocorrelation in panel data
H0: no first order autocorrelation
    F(  1,      21) =      1.712
           Prob > F =      0.2048

. 
. xtreg `dv' `iv' `iv2' `cont' if LAC==0, fe cluster(CID) 

Fixed-effects (within) regression               Number of obs     =      1,124
Group variable: CID                             Number of groups  =         66

R-squared:                                      Obs per group:
     Within  = 0.2833                                         min =          6
     Between = 0.1307                                         avg =       17.0
     Overall = 0.1269                                         max =         20

                                                F(7,65)           =      38.36
corr(u_i, Xb) = -0.5782                         Prob > F          =     0.0000

                                   (Std. err. adjusted for 66 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
       lrhom | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      fraser |  -.2178494   .1229662    -1.77   0.081      -.46343    .0277311
  infantmort |   .0127458   .0215853     0.59   0.557     -.030363    .0558546
         edu |  -3.149314    .833277    -3.78   0.000    -4.813483   -1.485145
       unemp |   .0105696   .0072231     1.46   0.148    -.0038559    .0249951
    popdense |  -.0003607   .0000874    -4.13   0.000    -.0005352   -.0001861
    perurban |  -.0309655   .0141019    -2.20   0.032    -.0591291    -.002802
    sexratio |  -.0014207   .0049364    -0.29   0.774    -.0112794    .0084379
       _cons |   6.649338   1.429421     4.65   0.000     3.794587    9.504089
-------------+----------------------------------------------------------------
     sigma_u |  1.1637974
     sigma_e |  .35729713
         rho |  .91386378   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. outreg2 using `file', `opt' append addnote(NO_LAC_conditioned) 
warning: addnote ignored in appended columns
MAR08-CondtionModel.xml
dir : seeout

. xttest3

Modified Wald test for groupwise heteroskedasticity
in fixed effect regression model

H0: sigma(i)^2 = sigma^2 for all i

chi2 (66)  =   17257.84
Prob>chi2 =      0.0000


. qui reg `dv' `iv' `iv2' `cont' if LAC==0

. vif

    Variable |       VIF       1/VIF  
-------------+----------------------
         edu |      2.62    0.381426
  infantmort |      1.98    0.505150
      fraser |      1.98    0.505863
    perurban |      1.84    0.544599
    sexratio |      1.35    0.738823
    popdense |      1.25    0.802326
       unemp |      1.20    0.834903
-------------+----------------------
    Mean VIF |      1.74

. xtserial `dv' `iv' `iv2' `cont' if LAC==0

Wooldridge test for autocorrelation in panel data
H0: no first order autocorrelation
    F(  1,      64) =      3.822
           Prob > F =      0.0549

. 
. //      #3
. //      Conditioned sample w/ only and w/o LAC Heritage 
. xtreg `dv' heritage `iv2' `cont' if LAC==1, fe cluster(CID)

Fixed-effects (within) regression               Number of obs     =        400
Group variable: CID                             Number of groups  =         22

R-squared:                                      Obs per group:
     Within  = 0.0716                                         min =         13
     Between = 0.0032                                         avg =       18.2
     Overall = 0.0042                                         max =         20

                                                F(7,21)           =       2.27
corr(u_i, Xb) = -0.7000                         Prob > F          =     0.0693

                                   (Std. err. adjusted for 22 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
       lrhom | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
    heritage |     .01156   .0142005     0.81   0.425    -.0179715    .0410915
  infantmort |   .0245864   .0183132     1.34   0.194     -.013498    .0626708
         edu |   .4300673   2.214355     0.19   0.848    -4.174935     5.03507
       unemp |  -.0103854   .0252067    -0.41   0.685    -.0628057    .0420348
    popdense |   .0020514   .0150898     0.14   0.893    -.0293295    .0334323
    perurban |   .0328942   .0286376     1.15   0.264    -.0266609    .0924493
    sexratio |  -.1821193    .073154    -2.49   0.021    -.3342514   -.0299872
       _cons |   16.48144   7.985528     2.06   0.052    -.1253767    33.08825
-------------+----------------------------------------------------------------
     sigma_u |  1.2530888
     sigma_e |  .47265743
         rho |  .87544576   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. outreg2 using `file', `opt' append addnote(LAC_conditioned) 
warning: addnote ignored in appended columns
MAR08-CondtionModel.xml
dir : seeout

. xttest3

Modified Wald test for groupwise heteroskedasticity
in fixed effect regression model

H0: sigma(i)^2 = sigma^2 for all i

chi2 (22)  =   16311.75
Prob>chi2 =      0.0000


. qui reg `dv' heritage `iv2' `cont' if LAC==1 

. vif

    Variable |       VIF       1/VIF  
-------------+----------------------
  infantmort |      2.62    0.381836
         edu |      2.41    0.414122
    perurban |      2.18    0.458606
    popdense |      1.92    0.522166
    sexratio |      1.67    0.598892
    heritage |      1.25    0.798676
       unemp |      1.11    0.903585
-------------+----------------------
    Mean VIF |      1.88

. xtserial `dv' heritage `iv2' `cont' if LAC==1

Wooldridge test for autocorrelation in panel data
H0: no first order autocorrelation
    F(  1,      21) =      1.576
           Prob > F =      0.2231

. 
. xtreg `dv' heritage `iv2' `cont' if LAC==0, fe cluster(CID) 

Fixed-effects (within) regression               Number of obs     =      1,087
Group variable: CID                             Number of groups  =         65

R-squared:                                      Obs per group:
     Within  = 0.2713                                         min =          3
     Between = 0.1279                                         avg =       16.7
     Overall = 0.1129                                         max =         20

                                                F(7,64)           =      42.09
corr(u_i, Xb) = -0.5910                         Prob > F          =     0.0000

                                   (Std. err. adjusted for 65 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
       lrhom | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
    heritage |  -.0141222   .0086896    -1.63   0.109    -.0314817    .0032373
  infantmort |   .0152951   .0226621     0.67   0.502    -.0299775    .0605678
         edu |  -3.182313    .754677    -4.22   0.000    -4.689953   -1.674672
       unemp |   .0125602   .0085462     1.47   0.147    -.0045128    .0296333
    popdense |  -.0003757   .0000821    -4.58   0.000    -.0005396   -.0002117
    perurban |  -.0308335   .0150148    -2.05   0.044     -.060829   -.0008381
    sexratio |  -.0005356   .0049708    -0.11   0.915     -.010466    .0093947
       _cons |   5.887607   1.209486     4.87   0.000     3.471382    8.303832
-------------+----------------------------------------------------------------
     sigma_u |  1.1625697
     sigma_e |  .36106537
         rho |  .91202848   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. outreg2 using `file', `opt' append addnote(NO_LAC_conditioned) 
warning: addnote ignored in appended columns
MAR08-CondtionModel.xml
dir : seeout

. xttest3

Modified Wald test for groupwise heteroskedasticity
in fixed effect regression model

H0: sigma(i)^2 = sigma^2 for all i

chi2 (65)  =   19089.41
Prob>chi2 =      0.0000


. qui reg `dv' heritage `iv2' `cont' if LAC==0

. vif

    Variable |       VIF       1/VIF  
-------------+----------------------
         edu |      2.59    0.385492
  infantmort |      2.07    0.482912
    heritage |      2.01    0.496606
    perurban |      1.82    0.550564
    sexratio |      1.39    0.719079
       unemp |      1.34    0.747331
    popdense |      1.32    0.758920
-------------+----------------------
    Mean VIF |      1.79

. xtserial `dv' heritage `iv2' `cont' if LAC==0

Wooldridge test for autocorrelation in panel data
H0: no first order autocorrelation
    F(  1,      62) =      3.596
           Prob > F =      0.0626

. 
. //      #4
. //      Conditioned sample w/ only and w/o LAC ROL 
. xtreg `dv' rol `iv2' `cont' if LAC==1, fe cluster(CID)

Fixed-effects (within) regression               Number of obs     =        359
Group variable: CID                             Number of groups  =         22

R-squared:                                      Obs per group:
     Within  = 0.0951                                         min =         11
     Between = 0.0012                                         avg =       16.3
     Overall = 0.0006                                         max =         18

                                                F(7,21)           =       2.90
corr(u_i, Xb) = -0.9499                         Prob > F          =     0.0274

                                   (Std. err. adjusted for 22 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
       lrhom | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         rol |  -.5703446   .2314034    -2.46   0.022    -1.051574   -.0891149
  infantmort |   .0183228   .0255748     0.72   0.482    -.0348629    .0715086
         edu |  -.2628647   2.475995    -0.11   0.916    -5.411979     4.88625
       unemp |  -.0125273   .0208962    -0.60   0.555    -.0559834    .0309288
    popdense |  -.0132818   .0172558    -0.77   0.450    -.0491673    .0226036
    perurban |   .0798422   .0352896     2.26   0.034     .0064536    .1532309
    sexratio |  -.0362974   .0868763    -0.42   0.680    -.2169664    .1443717
       _cons |   1.607443    9.29448     0.17   0.864    -17.72149    20.93637
-------------+----------------------------------------------------------------
     sigma_u |  3.1454205
     sigma_e |  .47657441
         rho |  .97755876   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. outreg2 using `file', `opt' append addnote(LAC_conditioned) 
warning: addnote ignored in appended columns
MAR08-CondtionModel.xml
dir : seeout

. xttest3

Modified Wald test for groupwise heteroskedasticity
in fixed effect regression model

H0: sigma(i)^2 = sigma^2 for all i

chi2 (22)  =    5335.84
Prob>chi2 =      0.0000


. qui reg `dv' rol `iv2' `cont' if LAC==1 

. vif

    Variable |       VIF       1/VIF  
-------------+----------------------
  infantmort |      2.80    0.357544
         edu |      2.54    0.394226
    perurban |      2.26    0.442603
    popdense |      1.87    0.534401
         rol |      1.76    0.567578
    sexratio |      1.69    0.591297
       unemp |      1.25    0.797072
-------------+----------------------
    Mean VIF |      2.02

. xtserial `dv' rol `iv2' `cont' if LAC==1

Wooldridge test for autocorrelation in panel data
H0: no first order autocorrelation
    F(  1,      21) =      2.209
           Prob > F =      0.1521

. 
. xtreg `dv' rol `iv2' `cont' if LAC==0, fe cluster(CID) 

Fixed-effects (within) regression               Number of obs     =      1,020
Group variable: CID                             Number of groups  =         66

R-squared:                                      Obs per group:
     Within  = 0.2573                                         min =          5
     Between = 0.1143                                         avg =       15.5
     Overall = 0.1267                                         max =         18

                                                F(7,65)           =      19.40
corr(u_i, Xb) = -0.7068                         Prob > F          =     0.0000

                                   (Std. err. adjusted for 66 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
       lrhom | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
         rol |  -.3953519    .221938    -1.78   0.080    -.8385927     .047889
  infantmort |   .0133468   .0221579     0.60   0.549    -.0309056    .0575991
         edu |  -3.804438   .8449818    -4.50   0.000    -5.491983   -2.116893
       unemp |   .0105835   .0061443     1.72   0.090    -.0016874    .0228545
    popdense |  -.0002334   .0001127    -2.07   0.042    -.0004584   -8.45e-06
    perurban |   -.038478   .0158822    -2.42   0.018     -.070197   -.0067591
    sexratio |   .0065323   .0067171     0.97   0.334    -.0068827    .0199473
       _cons |     5.5301   1.221828     4.53   0.000     3.089942    7.970258
-------------+----------------------------------------------------------------
     sigma_u |  1.3731842
     sigma_e |  .35186282
         rho |  .93838716   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. outreg2 using `file', `opt' append addnote(NO_LAC_conditioned) 
warning: addnote ignored in appended columns
MAR08-CondtionModel.xml
dir : seeout

. xttest3

Modified Wald test for groupwise heteroskedasticity
in fixed effect regression model

H0: sigma(i)^2 = sigma^2 for all i

chi2 (66)  =   17542.80
Prob>chi2 =      0.0000


. qui reg `dv' rol `iv2' `cont' if LAC==0

. vif

    Variable |       VIF       1/VIF  
-------------+----------------------
         rol |      2.53    0.394853
         edu |      2.43    0.411314
  infantmort |      2.07    0.483713
    perurban |      2.01    0.497840
    sexratio |      1.38    0.724735
       unemp |      1.21    0.824815
    popdense |      1.14    0.875355
-------------+----------------------
    Mean VIF |      1.82

. xtserial `dv' rol `iv2' `cont' if LAC==0

Wooldridge test for autocorrelation in panel data
H0: no first order autocorrelation
    F(  1,      64) =      3.645
           Prob > F =      0.0607

. 
. //      #5
. //      Fraser set up 
. gen Lfraser=. 
(1,524 missing values generated)

. sum fraser, de

                           Fraser
-------------------------------------------------------------
      Percentiles      Smallest
 1%         4.83           2.75
 5%         5.89           2.82
10%         6.32           3.08       Obs               1,524
25%         6.86           3.13       Sum of wgt.       1,524

50%         7.46                      Mean           7.306896
                        Largest       Std. dev.      .7883708
75%         7.85           8.82
90%         8.13           8.82       Variance       .6215286
95%          8.3           8.85       Skewness      -1.246213
99%         8.76           8.85       Kurtosis       6.370936

. replace Lfraser=1 if fraser<=r(p50)
(763 real changes made)

. replace Lfraser=0 if fraser>r(p50)
(761 real changes made)

. 
. 
. /*//    #6
> //      Conditioned INteractions 
> xtreg `dv' c.`iv'##c.`iv2' `cont' if Lfraser==1 & LAC==1, fe cluster(CID) 
> outreg2 using `file', `opt' append addnote(HFraser_Inter) 
> 
> xtreg `dv' c.`iv'##c.`iv2' `cont' if Lfraser==0 & LAC==1, fe cluster(CID)
> outreg2 using `file', `opt' append addnote(HFraser_Inter) 
> 
> 
> xtreg `dv' c.`iv'##c.lgdp `iv2' `cont' if Lfraser==1 & LAC==1, fe cluster(CID)
>  
> outreg2 using `file', `opt' append addnote(HFraser_Inter) 
> 
> xtreg `dv' c.`iv'##c.lgdp `iv2' `cont' if Lfraser==0 & LAC==1, fe cluster(CID)
> outreg2 using `file', `opt' append addnote(HFraser_Inter) 
> */
. 
. //      #7
. //      Fraser High
. xtreg `dv' `iv' `iv2' `cont' if Lfraser==0, fe cluster(CID) 

Fixed-effects (within) regression               Number of obs     =        761
Group variable: CID                             Number of groups  =         54

R-squared:                                      Obs per group:
     Within  = 0.2420                                         min =          1
     Between = 0.3933                                         avg =       14.1
     Overall = 0.3176                                         max =         20

                                                F(7,53)           =      78.77
corr(u_i, Xb) = 0.0115                          Prob > F          =     0.0000

                                   (Std. err. adjusted for 54 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
       lrhom | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      fraser |  -.1404501   .2151207    -0.65   0.517    -.5719277    .2910274
  infantmort |    .014118   .0267602     0.53   0.600    -.0395561    .0677921
         edu |   -3.95014   .6338082    -6.23   0.000    -5.221398   -2.678882
       unemp |  -.0059967   .0080663    -0.74   0.461    -.0221756    .0101822
    popdense |   .0001058   .0001693     0.62   0.535    -.0002338    .0004455
    perurban |   .0010761   .0225967     0.05   0.962    -.0442471    .0463994
    sexratio |  -.1064746   .0427612    -2.49   0.016    -.1922426   -.0207066
       _cons |   14.79839   4.912095     3.01   0.004     4.945978    24.65081
-------------+----------------------------------------------------------------
     sigma_u |  .91119927
     sigma_e |  .34232457
         rho |  .87631684   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. outreg2 using `file', `opt' append addnote(HFraser) 
warning: addnote ignored in appended columns
MAR08-CondtionModel.xml
dir : seeout

. xttest3

Modified Wald test for groupwise heteroskedasticity
in fixed effect regression model

H0: sigma(i)^2 = sigma^2 for all i

chi2 (54)  =   13539.85
Prob>chi2 =      0.0000


. qui reg `dv' `iv' `iv2' `cont' if Lfraser==0

. vif

    Variable |       VIF       1/VIF  
-------------+----------------------
         edu |      2.94    0.340708
  infantmort |      2.36    0.424619
    popdense |      1.77    0.564884
    perurban |      1.75    0.571793
      fraser |      1.65    0.606431
    sexratio |      1.60    0.624014
       unemp |      1.28    0.783021
-------------+----------------------
    Mean VIF |      1.91

. xtserial `dv' `iv' `iv2' `cont' if Lfraser==0

Wooldridge test for autocorrelation in panel data
H0: no first order autocorrelation
    F(  1,      47) =      0.033
           Prob > F =      0.8572

. 
. 
. //      #8
. //      Fraser Low 
. xtreg `dv' `iv' `iv2' `cont' if Lfraser==1, fe cluster(CID) 

Fixed-effects (within) regression               Number of obs     =        763
Group variable: CID                             Number of groups  =         66

R-squared:                                      Obs per group:
     Within  = 0.0931                                         min =          1
     Between = 0.1838                                         avg =       11.6
     Overall = 0.1611                                         max =         20

                                                F(7,65)           =       3.54
corr(u_i, Xb) = 0.1664                          Prob > F          =     0.0028

                                   (Std. err. adjusted for 66 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
       lrhom | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      fraser |  -.3324932   .1036258    -3.21   0.002    -.5394482   -.1255383
  infantmort |   .0128818   .0172085     0.75   0.457    -.0214858    .0472495
         edu |  -.4796209   1.758004    -0.27   0.786    -3.990598    3.031357
       unemp |    .012825   .0121329     1.06   0.294    -.0114061     .037056
    popdense |  -.0002837   .0008366    -0.34   0.736    -.0019544     .001387
    perurban |   .0112829   .0330753     0.34   0.734     -.054773    .0773387
    sexratio |  -.0059394   .0106437    -0.56   0.579    -.0271964    .0153176
       _cons |   3.562738   2.051663     1.74   0.087    -.5347163    7.660193
-------------+----------------------------------------------------------------
     sigma_u |  1.3213019
     sigma_e |  .43940973
         rho |  .90041829   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. outreg2 using `file', `opt' append addnote(HFraser) 
warning: addnote ignored in appended columns
MAR08-CondtionModel.xml
dir : seeout

. xttest3

Modified Wald test for groupwise heteroskedasticity
in fixed effect regression model

H0: sigma(i)^2 = sigma^2 for all i

chi2 (66)  =    2.4e+05
Prob>chi2 =      0.0000


. qui reg `dv' `iv' `iv2' `cont' if Lfraser==1

. vif

    Variable |       VIF       1/VIF  
-------------+----------------------
  infantmort |      1.97    0.507359
         edu |      1.84    0.544156
    perurban |      1.27    0.790137
    sexratio |      1.24    0.807647
       unemp |      1.13    0.887244
    popdense |      1.09    0.916672
      fraser |      1.05    0.948117
-------------+----------------------
    Mean VIF |      1.37

. xtserial `dv' `iv' `iv2' `cont' if Lfraser==1

Wooldridge test for autocorrelation in panel data
H0: no first order autocorrelation
    F(  1,      59) =      2.239
           Prob > F =      0.1399

. 
. //      #9
. //      Mod models with fraser  high`
. xtreg `dv' c.`iv'##c.`iv2' `cont' if Lfraser==0, fe cluster(CID) 

Fixed-effects (within) regression               Number of obs     =        761
Group variable: CID                             Number of groups  =         54

R-squared:                                      Obs per group:
     Within  = 0.2486                                         min =          1
     Between = 0.4056                                         avg =       14.1
     Overall = 0.3359                                         max =         20

                                                F(8,53)           =      70.64
corr(u_i, Xb) = 0.0097                          Prob > F          =     0.0000

                                   (Std. err. adjusted for 54 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
       lrhom | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      fraser |  -.4726438   .3035532    -1.56   0.125    -1.081495    .1362069
  infantmort |  -.3727112   .2657788    -1.40   0.167     -.905796    .1603736
             |
    c.fraser#|
c.infantmort |   .0511985   .0367033     1.39   0.169     -.022419    .1248159
             |
         edu |  -3.806187   .6528571    -5.83   0.000    -5.115652   -2.496721
       unemp |  -.0071785   .0080274    -0.89   0.375    -.0232794    .0089224
    popdense |   .0001181   .0001663     0.71   0.481    -.0002154    .0004515
    perurban |   .0015362   .0225622     0.07   0.946    -.0437177    .0467902
    sexratio |  -.1063951   .0417441    -2.55   0.014    -.1901231   -.0226672
       _cons |   17.18142   4.887048     3.52   0.001     7.379246     26.9836
-------------+----------------------------------------------------------------
     sigma_u |  .90116172
     sigma_e |  .34106889
         rho |  .87470333   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. outreg2 using `file', `opt' append addnote(LFraser_Inter) 
warning: addnote ignored in appended columns
MAR08-CondtionModel.xml
dir : seeout

. xttest3

Modified Wald test for groupwise heteroskedasticity
in fixed effect regression model

H0: sigma(i)^2 = sigma^2 for all i

chi2 (54)  =   13683.45
Prob>chi2 =      0.0000


. qui reg `dv' c.`iv'##c.`iv2' `cont' if Lfraser==0

. vif

    Variable |       VIF       1/VIF  
-------------+----------------------
      fraser |      5.72    0.174877
  infantmort |   2425.50    0.000412
    c.fraser#|
c.infantmort |   2399.04    0.000417
         edu |      2.97    0.337242
       unemp |      1.28    0.779006
    popdense |      2.06    0.485306
    perurban |      1.80    0.556782
    sexratio |      1.60    0.624013
-------------+----------------------
    Mean VIF |    605.00

. 
. //      #10
. //      Mod models with fraser low 
. xtreg `dv' c.`iv'##c.`iv2' `cont' if Lfraser==1, fe cluster(CID) 

Fixed-effects (within) regression               Number of obs     =        763
Group variable: CID                             Number of groups  =         66

R-squared:                                      Obs per group:
     Within  = 0.0959                                         min =          1
     Between = 0.2294                                         avg =       11.6
     Overall = 0.1973                                         max =         20

                                                F(8,65)           =       3.12
corr(u_i, Xb) = 0.2212                          Prob > F          =     0.0048

                                   (Std. err. adjusted for 66 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
       lrhom | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      fraser |  -.4725609   .2174871    -2.17   0.033    -.9069125   -.0382092
  infantmort |  -.0499808    .082214    -0.61   0.545    -.2141735    .1142119
             |
    c.fraser#|
c.infantmort |   .0096168   .0132573     0.73   0.471      -.01686    .0360935
             |
         edu |  -.3500461    1.78735    -0.20   0.845    -3.919631    3.219539
       unemp |    .011502   .0123904     0.93   0.357    -.0132433    .0362472
    popdense |  -.0002723    .000851    -0.32   0.750    -.0019719    .0014274
    perurban |   .0102278   .0309472     0.33   0.742    -.0515781    .0720336
    sexratio |  -.0057172   .0105522    -0.54   0.590    -.0267914     .015357
       _cons |   4.453185   1.972643     2.26   0.027     .5135453    8.392825
-------------+----------------------------------------------------------------
     sigma_u |  1.3033189
     sigma_e |  .43905492
         rho |   .8980817   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. outreg2 using `file', `opt' append addnote(HFraser_Inter) 
warning: addnote ignored in appended columns
MAR08-CondtionModel.xml
dir : seeout

. xttest3

Modified Wald test for groupwise heteroskedasticity
in fixed effect regression model

H0: sigma(i)^2 = sigma^2 for all i

chi2 (66)  =    3.8e+05
Prob>chi2 =      0.0000


. qui reg `dv' c.`iv'##c.`iv2' `cont' if Lfraser==1

. vif

    Variable |       VIF       1/VIF  
-------------+----------------------
      fraser |      8.90    0.112355
  infantmort |    270.04    0.003703
    c.fraser#|
c.infantmort |    262.31    0.003812
         edu |      1.84    0.544126
       unemp |      1.13    0.882284
    popdense |      1.09    0.915282
    perurban |      1.27    0.785706
    sexratio |      1.25    0.799262
-------------+----------------------
    Mean VIF |     68.48

. 
. //      #11
. //      GDP low and low 
. xtreg `dv' c.`iv'##c.lgdp `iv2' `cont' if Lfraser==0, fe cluster(CID) 

Fixed-effects (within) regression               Number of obs     =        761
Group variable: CID                             Number of groups  =         54

R-squared:                                      Obs per group:
     Within  = 0.2586                                         min =          1
     Between = 0.2669                                         avg =       14.1
     Overall = 0.2675                                         max =         20

                                                F(9,53)           =      52.18
corr(u_i, Xb) = -0.4711                         Prob > F          =     0.0000

                                   (Std. err. adjusted for 54 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
       lrhom | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      fraser |   1.819928   2.871699     0.63   0.529     -3.93997    7.579826
        lgdp |   .6690391   2.049677     0.33   0.745    -3.442092     4.78017
             |
    c.fraser#|
      c.lgdp |  -.1878622   .2734107    -0.69   0.495    -.7362546    .3605302
             |
  infantmort |  -.0090436   .0320552    -0.28   0.779    -.0733382     .055251
         edu |  -2.990023   .8119426    -3.68   0.001    -4.618573   -1.361472
       unemp |  -.0194034    .010794    -1.80   0.078    -.0410533    .0022466
    popdense |   .0002715   .0001916     1.42   0.162    -.0001128    .0006559
    perurban |   .0024075   .0245761     0.10   0.922    -.0468859    .0517008
    sexratio |  -.1122359   .0416156    -2.70   0.009    -.1957063   -.0287655
       _cons |   7.401147   22.48585     0.33   0.743    -37.69975    52.50204
-------------+----------------------------------------------------------------
     sigma_u |  1.0898394
     sigma_e |   .3390399
         rho |  .91176155   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. outreg2 using `file', `opt' append addnote(LFraser_Inter_GDP) 
warning: addnote ignored in appended columns
MAR08-CondtionModel.xml
dir : seeout

. xttest3

Modified Wald test for groupwise heteroskedasticity
in fixed effect regression model

H0: sigma(i)^2 = sigma^2 for all i

chi2 (54)  =   12824.19
Prob>chi2 =      0.0000


. //       high 
. xtreg `dv' c.`iv'##c.lgdp `iv2' `cont' if Lfraser==1, fe cluster(CID) 

Fixed-effects (within) regression               Number of obs     =        746
Group variable: CID                             Number of groups  =         65

R-squared:                                      Obs per group:
     Within  = 0.1377                                         min =          1
     Between = 0.1623                                         avg =       11.5
     Overall = 0.1144                                         max =         20

                                                F(9,64)           =       6.82
corr(u_i, Xb) = -0.2420                         Prob > F          =     0.0000

                                   (Std. err. adjusted for 65 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
       lrhom | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      fraser |  -2.867491   1.176655    -2.44   0.018    -5.218129    -.516853
        lgdp |  -2.749904   .9693835    -2.84   0.006     -4.68647   -.8133378
             |
    c.fraser#|
      c.lgdp |   .2879286   .1356187     2.12   0.038      .016999    .5588582
             |
  infantmort |   .0024428   .0151285     0.16   0.872    -.0277799    .0326655
         edu |   1.105167   2.521904     0.44   0.663    -3.932917     6.14325
       unemp |  -.0036784   .0169312    -0.22   0.829    -.0375024    .0301457
    popdense |  -.0002795    .000847    -0.33   0.743    -.0019716    .0014127
    perurban |   .0169791   .0340487     0.50   0.620    -.0510409    .0849991
    sexratio |  -.0138608   .0124093    -1.12   0.268    -.0386513    .0109296
       _cons |   27.44684   8.343235     3.29   0.002     10.77931    44.11437
-------------+----------------------------------------------------------------
     sigma_u |  1.3211181
     sigma_e |  .43370734
         rho |  .90271196   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. outreg2 using `file', `opt' append addnote(HFraser_Inter_GDP) 
warning: addnote ignored in appended columns
MAR08-CondtionModel.xml
dir : seeout

. xttest3

Modified Wald test for groupwise heteroskedasticity
in fixed effect regression model

H0: sigma(i)^2 = sigma^2 for all i

chi2 (65)  =    1.5e+05
Prob>chi2 =      0.0000


. 
. 
. //      #12
. //      all 
. xtreg `dv' c.`iv'##c.lgdp c.`iv'##c.`iv2' `cont' if Lfraser==0, fe cluster(CID
> ) 
note: fraser omitted because of collinearity.

Fixed-effects (within) regression               Number of obs     =        761
Group variable: CID                             Number of groups  =         54

R-squared:                                      Obs per group:
     Within  = 0.2600                                         min =          1
     Between = 0.2782                                         avg =       14.1
     Overall = 0.2825                                         max =         20

                                                F(10,53)          =      56.07
corr(u_i, Xb) = -0.4219                         Prob > F          =     0.0000

                                   (Std. err. adjusted for 54 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
       lrhom | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      fraser |   .4891456   4.511348     0.11   0.914    -8.559472    9.537763
        lgdp |  -.1361569   3.053847    -0.04   0.965    -6.261398    5.989084
             |
    c.fraser#|
      c.lgdp |  -.0755539   .4083528    -0.19   0.854    -.8946058     .743498
             |
      fraser |          0  (omitted)
  infantmort |  -.2467903   .4090359    -0.60   0.549    -1.067213    .5736318
             |
    c.fraser#|
c.infantmort |   .0312918   .0537702     0.58   0.563    -.0765575    .1391411
             |
         edu |   -2.98131   .8143499    -3.66   0.001    -4.614689   -1.347931
       unemp |  -.0186314   .0111883    -1.67   0.102    -.0410723    .0038095
    popdense |     .00023   .0002032     1.13   0.263    -.0001775    .0006375
    perurban |   .0023719   .0243714     0.10   0.923    -.0465109    .0512547
    sexratio |   -.109702   .0412751    -2.66   0.010    -.1924894   -.0269146
       _cons |   16.79041   34.12192     0.49   0.625    -51.64948    85.23031
-------------+----------------------------------------------------------------
     sigma_u |   1.058673
     sigma_e |  .33895435
         rho |  .90702271   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. outreg2 using `file', `opt' append addnote(IN_LFraser_Inter_GDP) 
warning: addnote ignored in appended columns
MAR08-CondtionModel.xml
dir : seeout

. xtreg `dv' c.`iv'##c.lgdp c.`iv'##c.`iv2' `cont' if Lfraser==1, fe cluster(CID
> ) 
note: fraser omitted because of collinearity.

Fixed-effects (within) regression               Number of obs     =        746
Group variable: CID                             Number of groups  =         65

R-squared:                                      Obs per group:
     Within  = 0.1612                                         min =          1
     Between = 0.1711                                         avg =       11.5
     Overall = 0.1246                                         max =         20

                                                F(10,64)          =       6.48
corr(u_i, Xb) = -0.2314                         Prob > F          =     0.0000

                                   (Std. err. adjusted for 65 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
       lrhom | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      fraser |  -5.153749   1.725474    -2.99   0.004    -8.600779   -1.706719
        lgdp |  -4.058291   1.234662    -3.29   0.002    -6.524812    -1.59177
             |
    c.fraser#|
      c.lgdp |   .4888295   .1798503     2.72   0.008     .1295371    .8481218
             |
      fraser |          0  (omitted)
  infantmort |  -.2327618   .1057495    -2.20   0.031    -.4440207    -.021503
             |
    c.fraser#|
c.infantmort |   .0355327    .016649     2.13   0.037     .0022724    .0687929
             |
         edu |     1.3926   2.492412     0.56   0.578    -3.586565    6.371765
       unemp |  -.0084558   .0167955    -0.50   0.616    -.0420087     .025097
    popdense |  -.0002807   .0008222    -0.34   0.734    -.0019232    .0013617
    perurban |   .0134581   .0278896     0.48   0.631    -.0422578     .069174
    sexratio |  -.0127465   .0120958    -1.05   0.296    -.0369106    .0114176
       _cons |   42.34123   11.11267     3.81   0.000     20.14112    64.54135
-------------+----------------------------------------------------------------
     sigma_u |  1.3094471
     sigma_e |  .42808219
         rho |  .90344393   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. outreg2 using `file', `opt' append addnote(IN_HFraser_Inter_GDP) 
warning: addnote ignored in appended columns
MAR08-CondtionModel.xml
dir : seeout

. 
. //      #13
. //      mediating models high fraser 
. preserve

. drop if Lfraser!=0 
(763 observations deleted)

. sem ( `iv'-> `iv2' , ) (`iv' `iv2' -> `dv', ) (`cont' -> `dv', ) (`icid' ->`dv
> ')  ,  vce(cluster CID) nocapslatent

Endogenous variables
  Observed: infantmort lrhom

Exogenous variables
  Observed: fraser edu unemp popdense perurban sexratio i1 i2 i3 i4 i5 i6 i7
            i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24
            i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40
            i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56
            i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72
            i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i87 i88

Fitting target model:
Iteration 0:   log pseudolikelihood = -3397.8005  
Iteration 1:   log pseudolikelihood = -3397.8005  

Structural equation model                                  Number of obs = 761
Estimation method: ml

Log pseudolikelihood = -3397.8005

                                    (Std. err. adjusted for 54 clusters in CID)
-------------------------------------------------------------------------------
              |               Robust
              | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
--------------+----------------------------------------------------------------
Structural    |
  infantmort  |
       fraser |  -5.159407   1.650705    -3.13   0.002    -8.394729   -1.924086
        _cons |   47.09241   13.56702     3.47   0.001     20.50155    73.68327
  ------------+----------------------------------------------------------------
  lrhom       |
   infantmort |    .014118   .0266366     0.53   0.596    -.0380888    .0663249
       fraser |  -.1404501   .2141278    -0.66   0.512    -.5601328    .2792326
          edu |   -3.95014   .6308826    -6.26   0.000    -5.186647   -2.713633
        unemp |  -.0059967    .008029    -0.75   0.455    -.0217334    .0097399
     popdense |   .0001058   .0001686     0.63   0.530    -.0002245    .0004362
     perurban |   .0010761   .0224924     0.05   0.962    -.0430081    .0451604
     sexratio |  -.1064746   .0425638    -2.50   0.012    -.1898981   -.0230512
           i1 |          0  (constrained)
           i2 |          0  (constrained)
           i3 |    -.98907   .1087043    -9.10   0.000    -1.202127   -.7760134
           i4 |  -2.794904   .5696357    -4.91   0.000     -3.91137   -1.678439
           i5 |    .365423   .3199016     1.14   0.253    -.2615726    .9924187
           i6 |          0  (constrained)
           i7 |  -3.208829   .5318531    -6.03   0.000    -4.251242   -2.166416
           i8 |          0  (constrained)
           i9 |  -1.656645   .3904477    -4.24   0.000    -2.421908   -.8913812
          i10 |          0  (constrained)
          i11 |          0  (constrained)
          i12 |          0  (constrained)
          i13 |  -2.266064   .2626286    -8.63   0.000    -2.780807   -1.751322
          i14 |  -1.445989   .0758906   -19.05   0.000    -1.594732   -1.297246
          i15 |          0  (constrained)
          i16 |  -.9298145   .2072718    -4.49   0.000     -1.33606   -.5235692
          i17 |          0  (constrained)
          i18 |  -.2194076   .2854525    -0.77   0.442    -.7788842    .3400689
          i19 |  -2.405695   .6518209    -3.69   0.000     -3.68324   -1.128149
          i20 |  -1.466211   .4303653    -3.41   0.001    -2.309711     -.62271
          i21 |  -2.238777   .2927746    -7.65   0.000    -2.812605   -1.664949
          i22 |   -1.90206   .1169346   -16.27   0.000    -2.131248   -1.672873
          i23 |   .0474049   .5802294     0.08   0.935    -1.089824    1.184634
          i24 |          0  (constrained)
          i25 |  -.2686276   .5339293    -0.50   0.615     -1.31511    .7778546
          i26 |   -1.21886   .5115046    -2.38   0.017    -2.221391   -.2163297
          i27 |          0  (constrained)
          i28 |  -1.217742   .1384597    -8.79   0.000    -1.489118   -.9463661
          i29 |  -3.045589   .2892235   -10.53   0.000    -3.612456   -2.478721
          i30 |   -2.62849   .5506374    -4.77   0.000    -3.707719    -1.54926
          i31 |   -2.44531   .2193633   -11.15   0.000    -2.875254   -2.015366
          i32 |          0  (constrained)
          i33 |  -.5914784   .6514991    -0.91   0.364    -1.868393    .6854364
          i34 |          0  (constrained)
          i35 |   -2.62005   .4660797    -5.62   0.000    -3.533549    -1.70655
          i36 |  -1.838764   .2626374    -7.00   0.000    -2.353523   -1.324004
          i37 |  -1.833246   .4927042    -3.72   0.000    -2.798928   -.8675634
          i38 |  -1.317687   .2760515    -4.77   0.000    -1.858738   -.7766362
          i39 |  -2.885887   .4127823    -6.99   0.000    -3.694926   -2.076849
          i40 |  -1.944444    .586084    -3.32   0.001    -3.093148   -.7957408
          i41 |  -3.299961   .2516753   -13.11   0.000    -3.793235   -2.806686
          i42 |  -.9982693   .5589681    -1.79   0.074    -2.093827     .097288
          i43 |  -2.008719   .4544911    -4.42   0.000    -2.899505   -1.117932
          i44 |  -1.557025   .2038424    -7.64   0.000    -1.956549   -1.157502
          i45 |          0  (constrained)
          i46 |          0  (constrained)
          i47 |  -1.369054   .6064474    -2.26   0.024    -2.557669   -.1804387
          i48 |  -1.443134   .5924272    -2.44   0.015     -2.60427   -.2819975
          i49 |  -2.429363   .2233211   -10.88   0.000    -2.867064   -1.991661
          i50 |  -3.158943    .426452    -7.41   0.000    -3.994774   -2.323113
          i51 |   -2.32475   .4007165    -5.80   0.000     -3.11014   -1.539361
          i52 |  -1.496224   .8176738    -1.83   0.067    -3.098835    .1063876
          i53 |          0  (constrained)
          i54 |          0  (constrained)
          i55 |  -1.759468   .4339853    -4.05   0.000    -2.610064   -.9088725
          i56 |          0  (constrained)
          i57 |  -1.902557   .1555954   -12.23   0.000    -2.207519   -1.597596
          i58 |  -1.389775   .1312069   -10.59   0.000    -1.646936   -1.132614
          i59 |          0  (constrained)
          i60 |  -1.725816   .2121065    -8.14   0.000    -2.141537   -1.310095
          i61 |   .0660289    .413054     0.16   0.873    -.7435421    .8755999
          i62 |          0  (constrained)
          i63 |  -2.070653   .2906758    -7.12   0.000    -2.640367   -1.500939
          i64 |          0  (constrained)
          i65 |          0  (constrained)
          i66 |  -3.022674   .5860962    -5.16   0.000    -4.171401   -1.873946
          i67 |          0  (constrained)
          i68 |  -1.996305    .614225    -3.25   0.001    -3.200164   -.7924461
          i69 |          0  (constrained)
          i70 |          0  (constrained)
          i71 |  -2.844406   1.001411    -2.84   0.005    -4.807136   -.8816767
          i72 |  -2.487051   .6472819    -3.84   0.000      -3.7557   -1.218402
          i73 |          0  (constrained)
          i74 |          0  (constrained)
          i75 |  -2.442936   .2108752   -11.58   0.000    -2.856244   -2.029628
          i76 |  -1.674437   .1529202   -10.95   0.000    -1.974155   -1.374719
          i77 |   -2.39847   .1863754   -12.87   0.000    -2.763759   -2.033181
          i78 |          0  (constrained)
          i79 |          0  (constrained)
          i80 |          0  (constrained)
          i81 |          0  (constrained)
          i82 |          0  (constrained)
          i83 |  -2.452995   .6064583    -4.04   0.000    -3.641632   -1.264359
          i84 |          0  (constrained)
          i85 |  -2.909609   .1014498   -28.68   0.000    -3.108447   -2.710771
          i87 |  -1.265529   .4614738    -2.74   0.006    -2.170001   -.3610568
          i88 |          0  (constrained)
        _cons |   16.65199    5.06635     3.29   0.001     6.722122    26.58185
--------------+----------------------------------------------------------------
var(e.infan~t)|   27.32927   7.055539                      16.47688    45.32949
  var(e.lrhom)|   .1077927   .0229811                      .0709767    .1637055
-------------------------------------------------------------------------------

. outreg2 using `file', append `opt'  addnote(LF_`iv'->`iv2')
warning: addnote ignored in appended columns
check eret list for the existence of e(r2)
MAR08-CondtionModel.xml
dir : seeout

. restore 

. /* ML not possible to obtain 
> preserve 
> drop if Lfraser!=1
> sem ( `iv'-> `iv2' , ) (`iv' `iv2' -> `dv', ) (`cont' -> `dv', ) (`icid' ->`dv
> ')  ,  vce(cluster CID) nocapslatent
> outreg2 using `file', append `opt'  addnote(LF_`iv'->`iv2')
> restore 
> */
. 
. //      #14
. //      fraser^2 
. tempfile hold

. xtreg `dv' c.`iv'##c.`iv' `iv2' `cont', fe cluster(CID) 

Fixed-effects (within) regression               Number of obs     =      1,524
Group variable: CID                             Number of groups  =         88

R-squared:                                      Obs per group:
     Within  = 0.1335                                         min =          6
     Between = 0.3232                                         avg =       17.3
     Overall = 0.3163                                         max =         20

                                                F(8,87)           =      19.22
corr(u_i, Xb) = 0.2328                          Prob > F          =     0.0000

                                   (Std. err. adjusted for 88 clusters in CID)
------------------------------------------------------------------------------
             |               Robust
       lrhom | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
-------------+----------------------------------------------------------------
      fraser |  -.8754666   .4282559    -2.04   0.044    -1.726672   -.0242616
             |
    c.fraser#|
    c.fraser |   .0489207   .0351519     1.39   0.168    -.0209474    .1187888
             |
  infantmort |   .0037216   .0135674     0.27   0.784    -.0232449    .0306882
         edu |  -3.043558    .903271    -3.37   0.001    -4.838907   -1.248209
       unemp |   .0053591   .0084591     0.63   0.528    -.0114542    .0221724
    popdense |  -.0003314   .0001016    -3.26   0.002    -.0005334   -.0001294
    perurban |   .0109951   .0225759     0.49   0.627     -.033877    .0558673
    sexratio |  -.0114476   .0070263    -1.63   0.107    -.0254131    .0025179
       _cons |   7.276469   1.932575     3.77   0.000     3.435266    11.11767
-------------+----------------------------------------------------------------
     sigma_u |  1.1590173
     sigma_e |  .40959947
         rho |  .88897326   (fraction of variance due to u_i)
------------------------------------------------------------------------------

. outreg2 using `file', append `opt'  addnote(`iv'^2)
warning: addnote ignored in appended columns
MAR08-CondtionModel.xml
dir : seeout

. margins, at(fraser = (0(1)10)) saving(`hold', replace) 

Predictive margins                                       Number of obs = 1,524
Model VCE: Robust

Expression: Linear prediction, predict()
1._at:  fraser =  0
2._at:  fraser =  1
3._at:  fraser =  2
4._at:  fraser =  3
5._at:  fraser =  4
6._at:  fraser =  5
7._at:  fraser =  6
8._at:  fraser =  7
9._at:  fraser =  8
10._at: fraser =  9
11._at: fraser = 10

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   4.644111   1.311469     3.54   0.000     2.073678    7.214543
          2  |   3.817565   .9357099     4.08   0.000     1.983607    5.651522
          3  |    3.08886   .6349468     4.86   0.000     1.844387    4.333333
          4  |   2.457997    .411978     5.97   0.000     1.650535    3.265459
          5  |   1.924975   .2680947     7.18   0.000     1.399519    2.450431
          6  |   1.489794     .18941     7.87   0.000     1.118557    1.861031
          7  |   1.152455   .1328828     8.67   0.000     .8920093    1.412901
          8  |    .912957   .0529465    17.24   0.000     .8091837     1.01673
          9  |   .7713004   .0809427     9.53   0.000     .6126556    .9299452
         10  |   .7274851   .2716575     2.68   0.007     .1950462    1.259924
         11  |   .7815112   .5282916     1.48   0.139    -.2539214    1.816944
------------------------------------------------------------------------------
(file C:\Users\MEGHRO~1\AppData\Local\Temp\ST_2964_000005.tmp not found)

. preserve 

. use `hold', clear 
(Created by command margins; also see char list)

. gen model=1 

. gen varX="Margin"

. save ppFraser2.dta, replace 
file ppFraser2.dta saved

. restore 

. marginsplot, name(p1, replace)

Variables that uniquely identify margins: fraser

. margins, dydx(fraser) at(fraser = (0(1)10))

Average marginal effects                                 Number of obs = 1,524
Model VCE: Robust

Expression: Linear prediction, predict()
dy/dx wrt:  fraser
1._at:  fraser =  0
2._at:  fraser =  1
3._at:  fraser =  2
4._at:  fraser =  3
5._at:  fraser =  4
6._at:  fraser =  5
7._at:  fraser =  6
8._at:  fraser =  7
9._at:  fraser =  8
10._at: fraser =  9
11._at: fraser = 10

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
fraser       |
         _at |
          1  |  -.8754666   .4282559    -2.04   0.041    -1.714833   -.0361004
          2  |  -.7776253   .3594044    -2.16   0.030    -1.482045   -.0732056
          3  |   -.679784   .2912475    -2.33   0.020    -1.250619   -.1089493
          4  |  -.5819426   .2244191    -2.59   0.010    -1.021796   -.1420892
          5  |  -.4841013   .1605864    -3.01   0.003    -.7988448   -.1693577
          6  |  -.3862599   .1053435    -3.67   0.000    -.5927294   -.1797905
          7  |  -.2884186   .0793205    -3.64   0.000    -.4438839   -.1329533
          8  |  -.1905773    .106637    -1.79   0.074    -.3995819    .0184274
          9  |  -.0927359   .1622849    -0.57   0.568    -.4108084    .2253365
         10  |   .0051054   .2262444     0.02   0.982    -.4383255    .4485363
         11  |   .1029467   .2931244     0.35   0.725    -.4715665      .67746
------------------------------------------------------------------------------

. preserve 

. use `hold', clear 
(Created by command margins; also see char list)

. gen model=1 

. gen varX="DYDX"

. save dydxFraser2.dta, replace 
file dydxFraser2.dta saved

. restore 

. marginsplot, name(p2, replace) 

Variables that uniquely identify margins: fraser

. 
. 
. 
. //      #15
. //      save and close 
. save `file'.dta, replace
file MAR08-CondtionModel.dta saved

. log close 
      name:  <unnamed>
       log:  R:\Current Research\Markets-Pridemore\Work\MAR08-CondtionModel.log
  log type:  text
 closed on:   2 Jun 2025, 15:39:59
--------------------------------------------------------------------------------
